package com.guigu.buy.service.impl;

import com.github.pagehelper.PageInfo;
import com.guigu.buy.dto.CellUtils;
import com.guigu.buy.mapper.StockDetailsMapper;
import com.guigu.buy.mapper.StorageMapper;
import com.guigu.buy.pojo.StorageDetails;
import com.guigu.buy.mapper.StorageDetailsMapper;
import com.guigu.buy.service.IStorageDetailsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.buy.vo.CellVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
@Service
public class StorageDetailsServiceImpl extends ServiceImpl<StorageDetailsMapper, StorageDetails> implements IStorageDetailsService {
    @Autowired
    private StorageMapper storageMapper;
    @Override
    public void add(List<StorageDetails> list) {
        int id=storageMapper.getNew();
        for (StorageDetails s:list){
            s.setId(null);
            s.setParentId(id);
            this.save(s);
        }
    }

}
